package com.xiangxiangjd.analyse.bean;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.io.Serializable;
import java.util.List;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;

/**
 * <p>
 *
 * </p>
 *
 * @author 肖守凯
 * @since 2021-03-08
 */
@Data
@TableName("repair_structure")
@ApiModel(value = "RepairStructure对象", description = "")
public class RepairStructure extends Model<RepairStructure> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "结构id")
    @TableId(value = "structure_id", type = IdType.ID_WORKER_STR)
    private String structureId;

    public RepairStructure(String structureName, String parentId) {
        this.structureName = structureName;
        this.parentId = parentId;
    }

    @ApiModelProperty(value = "结构名字")
    @TableField("structure_name")
    private String structureName;

    @ApiModelProperty(value = "父级id 顶级为0")
    @TableField("parent_id")
    private String parentId;

    @ApiModelProperty(value = "是否删除 0 可用 / 1删除")
    @TableField("is_delete")
    private String isDelete;


    //自动新增时间
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private String createTime;
    //自动更新时间

    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private String updateTime;


    //下级菜单   所有的子集存储
    @TableField(exist = false)
    private List<RepairStructure> children;


}
